<?
include '../config.inc.php';
 $username =  @$_GET['username'];
 $password =  @$_GET['password'];
 $set_nickname =  @$_GET['set_nickname'];
 $set_username =  @$_GET['set_username'];
 $set_admin =  @$_GET['set_admin'];

 if($set_nickname ==''){
   echo 'no';
   exit;
 }
 if($set_username ==''){
   echo 'no';
   exit;
 }
include '../member.php';
//判断是否管理员
if($admin != 1){
  echo '错误';
  exit;
}
?>
<!DOCTYPE html>
<html>    
<meta http-equiv="content-type" content="text/html;charset=utf-8">
 <head>
 <script src="../js/jquery.1.7.2.min.js"></script>
 <link href="../layui/css/layui.css" rel="stylesheet" type="text/css"/>
 <script src="../layer/layer.js"></script>
 <script src="../layui/layui.js"> </script>
<body>
<p>你正在对[<?echo $set_nickname;?>]账号[<?echo $set_username;?>] 操作</p>
<span>昵称：</span><textarea id="set_nickname" type="textarea" autosize="[object Object]" rows="2" autocomplete="off"validateevent="true" class="el-textarea__inner" style="height: 20px;"><?echo $set_nickname;?></textarea><br>
<span>状态：</span><textarea id="set_talk" type="textarea" autosize="[object Object]" rows="2" autocomplete="off"validateevent="true" class="el-textarea__inner" style="height: 20px;"><?echo $talk;?></textarea><br>
<a> 0为正常 1为禁言</a><br>
<span>身份设置：</span><textarea id="set_admin" type="textarea" autosize="[object Object]" rows="2" autocomplete="off"validateevent="true" class="el-textarea__inner" style="height: 20px;"><?echo $set_admin;?></textarea><br>
<a> 0为正常用户 1为管理员</a>
 <button onclick="user_set_btn();" class="layui-btn layui-btn-small">确认修改</button>
 </body>


 <script>
function user_set_btn(){
	var set_username = '<?echo $set_username;?>'
	var set_talk = document.getElementById('set_talk').value;
	var set_nickname = document.getElementById('set_nickname').value;
	var set_admin = document.getElementById('set_admin').value;

  //OK后发送post
$.post("/user_set/user_set_post.php", {username: '<?echo $username;?>',password: '<?echo $password;?>',set_username: set_username,set_nickname: set_nickname,set_talk :set_talk,set_admin: set_admin},
   function(data){
	//返回值
   layer.msg(data);
   });

}

 </script>

